//
//  HideValueTransformer.m
//  Task Views
//
//  Created by Chris Karr on 6/29/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import "HideValueTransformer.h"


@implementation HideValueTransformer

+ (Class) transformedValueClass
{
    return [NSNumber class];
}

+ (BOOL) allowsReverseTransformation
{
    return YES;
}

- (id)reverseTransformedValue:(id) value
{
	if ([value boolValue])
		return @"true";
	else
		return @"false";
}

- (id)transformedValue:(id) value
{
	if ([value isEqual:@"true"])
		return [NSNumber numberWithBool:YES];
	else
		return [NSNumber numberWithBool:NO];
}

@end
